﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using Model;
using IDAL;

namespace DAL
{
    public class SqlgoodCommentDAL : IgoodCommentDAL
    {
        GameGOEntities db = DbContextFactory.CreateDbContext();
        public IEnumerable<goodComment> GetGoodCommentsByGoodId(int id)
        {
            return db.goodComment.Where(o => o.goodId == id).OrderByDescending(o=>o.comTime);
        }
    }
}
